//路由表
export const routes = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/index.vue'),
  },
  //系统页面
  {
    name: 'menu',
    path: '/menu',
    component: () => import('@/views/menu/index.vue'),
    //各个子页面
    children: [
      //首页
      {
        name: 'home',
        path: '/home',
        component: () => import('@/views/home/index.vue'),
      },
      //系统设置
      {
        name: 'set',
        path: '/set',
        component: () => import('@/views/set/index.vue'),
      },
      //系统概览
      {
        name: 'overview',
        path: '/overview',
        component: () => import('@/views/overview/index.vue'),
      },
      //用户管理-产品
      {
        name: 'product',
        path: '/product',
        component: () => import('@/views/user_manage/product_manage/index.vue'),
      },
      //用户管理-用户
      {
        name: 'user',
        path: '/user',
        component: () => import('@/views/user_manage/users_manage/index.vue'),
      },
      // 用户管理-消息
      {
        name: 'message',
        path: '/message',
        component: () => import('@/views/user_manage/message_manage/index.vue'),
      },
      //用户管理- 用户列表
      {
        name: 'userlist',
        path: '/userlist',
        component: () => import('@/views/user_manage/user_list/index.vue'),
      },
      //产品管理
      //产品列表
      {
        name: 'product_manage_list',
        path: '/product_manage_list',
        component: () =>
          import('@/views/product/product_manage_list/index.vue'),
      },
      //出库列表
      {
        name: 'out_product_manage_list',
        path: '/out_product_manage_list',
        component: () =>
          import('@/views/product/out_product_manage_list/index.vue'),
      },
      //日志
      {
        name: 'login_log',
        path: '/login_log',
        component: () => import('@/views/login_log/index.vue'),
      },
      {
        name: 'operation_log',
        path: '/operation_log',
        component: () => import('@/views/operation_log/index.vue'),
      },
    ],
  },
  //大屏
  {
    name: 'screen',
    path: '/screen',
    component: () => import('@/views/screen/index.vue'),
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    component: () => import('@/views/404/index.vue'),
  }
]
